package com.kalvin.kvf.modules.ks.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kalvin.kvf.modules.ks.entity.KSCookie;
import org.springframework.stereotype.Service;
import com.kalvin.kvf.modules.ks.mapper.KSCookieMapper;

import java.util.List;

/**
 * <p>
 * 抖音登录信息的cookie 服务实现类
 * </p>
 * @since 2023-11-13 17:28:33
 */
@Service
public class KSCookieServiceImpl extends ServiceImpl<KSCookieMapper, KSCookie> implements KSCookieService {

    @Override
    public Page<KSCookie> listCookiePage(KSCookie cookie) {
        Page<KSCookie> page = new Page<>(cookie.getCurrent(), cookie.getSize());
        List<KSCookie> cookies = baseMapper.selectCookieList(cookie, page);
        return page.setRecords(cookies);
    }

}
